<?php

namespace App\Request\User;

use Hyperf\Validation\Request\FormRequest;

class MobileRegisterRequest extends FormRequest
{
    public function attributes(): array
    {
        return [
            'mobile' => '手机号',
            'code' => '验证码'
        ];
    }

    /**
     * 获取应用到请求的验证规则
     */
    public function rules(): array
    {
        return [
            'mobile' => 'required',
            'code' => 'required|size:4',
        ];
    }
    public function authorize(){
        return true;
    }
}